Skip to content

Dp subset tests Closes #9943 #10471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

aryandgandhi
Copy link
Contributor

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the description above includes the issue number(s) with a closing keyword: "Fixes #ISSUE-NUMBER".

@aryandgandhi aryandgandhi changed the title Dp subset tests Closes #10 Dp subset tests Closes #9943 Oct 14, 2023
@aryandgandhi
Copy link
Contributor Author

@cclauss @tianyizheng02 having trouble adding type annotations, there is an issue with ruff and mypy expectecing different annotations
Screenshot 2023-10-14 at 4 19 54 PM
Screenshot 2023-10-14 at 4 36 14 PM

@aryandgandhi
Copy link
Contributor Author

Added docstring tests, add hacktoberfest tag when possible

@aryandgandhi
Copy link
Contributor Author

CC. @dhruvmanila

for j in range(r):
print(data[j], end=" ")
print(" ")
print(" ".join(map(str, data[:r])))
Copy link
Member

@cclauss cclauss Oct 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONTRIBUTING.md says that algorithmic functions should not print() instead they should return values or yield values or raise exceptions.

@aryandgandhi
Copy link
Contributor Author

updated the print @cclauss

@cclauss
Copy link
Member

cclauss commented Oct 14, 2023

algorithmic functions should not print()

@aryandgandhi
Copy link
Contributor Author

algorithmic functions should not print()

Even in the main?

@cclauss
Copy link
Member

cclauss commented Oct 15, 2023

main() can print because it is a utility function, not an algorithmic function.

@aryandgandhi
Copy link
Contributor Author

main() can print because it is a utility function, not an algorithmic function.

Yeah I removed the print from algorithmic function

@aryandgandhi
Copy link
Contributor Author

@cclauss can this be merged with Hacktoberfest commit, or any changes you still reocmmend

@cclauss
Copy link
Member

cclauss commented Oct 17, 2023

This branch has conflicts that must be resolved

See below.

@cclauss
Copy link
Member

cclauss commented Oct 17, 2023

@cclauss cclauss closed this Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants